<template>
  <div v-show="isVisible" class="loading">
    <a-spin :tip="loadingText" size="large" :delay="1000"></a-spin>
  </div>
</template>

<script>
export default {
  props: {
    isVisible: {
      type: Boolean,
      default: false,
    },
    loadingText: {
      type: String,
      default: '加载中，请等待',
    },
  },
}
</script>

<style lang="less" scoped>
.loading {
  align-items: center;
  background-color: rgba(87, 96, 230, 0.1);
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 101;

  .spin-content {
    padding: 30px;
  }
}
</style>
